package com.zy.dp.chainofresponsibility.example2;

public class Client
{
	public static void main(String[] args)
	{
		Handler h1 = new GeneralManager();
		Handler h2 = new DepManager();
		Handler h3 = new ProjectManager();

		h1.setSuccessor(h2);
		h2.setSuccessor(h3);

		String ret1 = h1.handleFeeRequest("小李", 300);
		System.out.println(ret1);
		String ret2 = h1.handleFeeRequest("小张", 300);
		System.out.println(ret2);

		String ret3 = h1.handleFeeRequest("小李", 600);
		System.out.println(ret3);
		String ret4 = h1.handleFeeRequest("小张", 600);
		System.out.println(ret4);

		String ret5 = h1.handleFeeRequest("小李", 1200);
		System.out.println(ret5);
		String ret6 = h1.handleFeeRequest("小张", 1200);
		System.out.println(ret6);
	}
}
